@extends('home/main/layout')
@section('content')
<!--bottom-header-->
	<!--start-breadcrumbs-->
	<div class="breadcrumbs">
		<div class="container">
			<div class="breadcrumbs-main">
				<ol class="breadcrumb">
					<li><a href="index.html">首页</a></li>
					<li class="active">购物车</li>
				</ol>
			</div>
		</div>
	</div>
	<!--end-breadcrumbs-->
	<!--start-ckeckout-->
	<div class="ckeckout">
		<div class="container">
			<div class="ckeckout-top">
			<div class=" cart-items heading">
			 <h3>我的购物车</h3>
				<script>$(document).ready(function(c) {
					$('.close1').on('click', function(c){
						$('.cart-header').fadeOut('slow', function(c){
							$('.cart-header').remove();
						});
						});	  
					});
			   	</script>
				<script>
					$(document).ready(function(c) {
						$('.close2').on('click', function(c){
							$('.cart-header1').fadeOut('slow', function(c){
								$('.cart-header1').remove();
							});
						});	  
					});
			   </script>
			   <script>$(document).ready(function(c) {
					$('.close3').on('click', function(c){
						$('.cart-header2').fadeOut('slow', function(c){
							$('.cart-header2').remove();
						});
						});	  
					});
			   </script>
				
			<div class="in-check" >
				<ul class="unit">
					
									
					<li><span>商品信息</span></li>	
					<li><span>颜色</span></li>	
					<li><span>单价(元)</span></li>
					<li><span>数量</span></li>
					<li><span>金额(元)</span></li>
					<li><span>操作</span></li>
					
					<div class="clearfix"> </div>
					
				</ul>
				<ul class="cart-header">
					<div class="close1"> </div>
						<li class="ring-in"><input type="checkbox" name="tail"><a href="single.html" > <img src="images/s-1.jpg" class="img-responsive" alt=""></a>
						</li>
						<li><span>颜色</span></li>
						<li><span class="price">1.50</span> </li>
						<li><span>数量
							<input class="min" name="" type="button" value="-" />
							<input class="text_box p_num" name="" type="text" value="1" style="width:40px;" />
							<input class="add" name="" type="button" value="+" />
						</span></li>
						<li><span><p>总价：<label id="total"></label></p> </span></li>
						<li><span><a href="">删除</a></span></li>
						
					<div class="clearfix"> </div>
				</ul>
				<script type="text/javascript">
					jQuery(document).ready(function($) {
						
						$(".scroll").click(function(event){		
							event.preventDefault();
							$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
						});

						

						$(function(){
						$(".add").click(function(){

							var t=$(this).parent().find('input[class*=text_box]');
							t.val(parseInt(t.val())+1)
							
							var sum_price = $('.p_num').val() * parseFloat($('.price').text());
							$('#total').text(sum_price);
						})
						$(".min").click(function(){
							var t=$(this).parent().find('input[class*=text_box]');
							t.val(parseInt(t.val())-1)
							if(parseInt(t.val())<0){
								t.val(0);
							}
							
							var sum_price = $('.p_num').val() * parseFloat($('.price').text());
							

							$('#total').text(sum_price);

						});

						});

					});
				</script>
				
			</div>
			</div>  
		 </div>
		</div>
@stop

